home *** CD-ROM | disk | FTP | other *** search
- /* HiRes Picture Display
- ** ---------------------
- ** Opens a screen of 640 pixels width in HIRES mode. You can even try
- ** SuperHiRes (SHIRES) if you change the appropriate flag in the GameScreen
- ** structure.
- */
-
- MODULE 'games','games/games'
-
- PROC main()
- DEF screen:PTR TO gamescreen, palette:PTR TO INT, loadpic:PTR TO picture
-
- palette := [ $0000,$0400,$0501,$0501,$0601,$0701,$0701,$0801,
- $0901,$0A01,$0B02,$0432,$0CC0,$0F00,$0211,$0880
- ]:INT;
-
- screen := [ GSV1,0,
- 0,0,0, -> Screen_Mem1/2/3
- 0, -> Screen link.
- palette, -> Address of palette.
- 0, -> Address of rasterlist.
- 0, -> Amt of colours in palette.
- 640,256, -> Screen Width/Height
- 640,256, -> Pic Width/Height
- 4, -> Amt of planes.
- 0,0, -> Top of screen offsets, X/Y
- 0,0, -> X/Y counters (for scrolling).
- 0, -> Special attributes.
- HIRES, -> Screen mode.
- INTERLEAVED, -> Screen type
- 0 -> Reserved area.
- ]:gamescreen;
-
- loadpic := [ PCV1,0, -> Version header.
- 0, -> Destination.
- 640,256, -> Width, Height.
- 4, -> Amount of Planes.
- 16, -> Amount of colours.
- palette, -> Palette (remap).
- LORES, -> Screen mode.
- INTERLEAVED, -> Destination.
- 0 -> Parameters.
- ]:picture;
-
- IF gmsbase := OpenLibrary('games.library',0)
- SetUserPri()
- IF (Add_Screen(screen) = ERR_OK)
- loadpic.data := screen.memptr1;
- IF (LoadPic('GAMESLIB:data/IFF.Pic640x256',loadpic) = ERR_OK)
- Show_Screen(screen)
- Wait_LMB()
- ENDIF
- Delete_Screen(screen)
- ENDIF
- CloseLibrary(gmsbase)
- ENDIF
- ENDPROC
-
-